const fs = require('fs');
function readsrtFile(path) {
    const _t = fs.readFileSync(path, 'utf8').match(/(^|\n)\s*\d+\s*\n\s*[^\n]+\n[^\n]+(\n|$)/g);
    console.log(_t);
    // 判断条数
    return Array.from(_t, (ceil) => {
        let _temp = ceil.split(/\n/);
        const _now = [];
        _temp.forEach((cceil) => {
            if (cceil.trim()) {
                _now.push(cceil.trim());
            }
        });
        return _now;
    });
}
console.log(readsrtFile('/Users/huangshaolu/video-subtitle-extractor/backend/video/video.srt'));